package com.wanbangee.marksystem.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.wanbangee.marksystem.entities.SScore;
import com.wanbangee.marksystem.service.TestMarkInfoService;
import com.wanbangee.marksystem.service.examscore.ExamInfoService;


/**
 * 阅卷打分界面
 * @author 小粥愚
 *
 */
@RestController
public class TestMarkInfoController {
	
	@Autowired
	private TestMarkInfoService testMarkInfoService;
	@Autowired
	private ExamInfoService examInfoService = null;
	
	
	
	/**
	 * 问题卷打分界面(信息)		(测试结果：✔)
	 * @param recordId 记录id
	 * @return
	 */
	@GetMapping("/exam-score/score/problemMarkInfo")
	public Map<String,Object> problemMarkInfo(Integer recordId){
		Map<String, Object> examProblemTestInfo = this.examInfoService.examProblemTestInfo(recordId);
		return examProblemTestInfo;
	}
	
	/**
	 * 仲裁打分界面(信息)			(测试结果：✔)
	 * @param examId
	 * @param examSubId
	 * @param teaId
	 * @param topicNo
	 * @return
	 */
	@GetMapping("/exam-score/score/arbitrationMarkInfo")
	public Map<String,Object> arbitrationMarkInfo(Integer examId,Integer examSubId,Integer teaId,String topicNo){
		Map<String,Object> map = new HashMap<>();
		List<SScore> testArbitrationMarkInfo = this.testMarkInfoService.testArbitrationMarkInfo(examId, examSubId, teaId, topicNo);
		map.put("code", 1001);
		map.put("msg", "查询成功");
		map.put("testMarkInfo", testArbitrationMarkInfo);
		return map;
	}
	
	/**
	 * 阅卷打分界面(信息)		(测试结果：✔)
	 * @param examId
	 * @param examSubId
	 * @param teaId
	 * @param topicNo
	 * @return
	 */
	@GetMapping("/exam-score/score/testMarkInfo")
	public Map<String,Object> markInfo(Integer examId,Integer examSubId,Integer teaId,String topicNo){
		Map<String,Object> map = new HashMap<>();
		List<SScore> testMarkInfo = this.testMarkInfoService.testMarkInfo(examId, examSubId, teaId, topicNo);
		map.put("code", 1001);
		map.put("msg", "查询成功");
		map.put("testMarkInfo", testMarkInfo);
		return map;
	}
}










